﻿
namespace CodeSHARPer.Services
{
    internal class JsonSerializer
    {
        internal static string Serialize(object o)
        {
            System.Web.Script.Serialization.JavaScriptSerializer serializer = new System.Web.Script.Serialization.JavaScriptSerializer();
            return serializer.Serialize(o);
        }

        internal static T Deserialize<T>(string json)
        {
            System.Web.Script.Serialization.JavaScriptSerializer serializer = new System.Web.Script.Serialization.JavaScriptSerializer();
            return serializer.Deserialize<T>(json);
        }
    }
}
